package org.test.bean;

import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.ImportResource;
import org.springframework.jmx.export.annotation.ManagedResource;
import org.springframework.stereotype.Component;


@Data
@Component
public class Student {
    String name;
    int age;

    @Autowired
    Card card;
    public Student() {
        System.out.println("Student");
    }
    public void play() {
        System.out.println("now is display");
    }

    @Autowired
    public void setCard(Card card) {
        this.card=card;
    }

    public void setCard2(@Autowired Card card) {
        this.card=card;
    }
}
